<script setup lang="ts">
import cacheRouter from "@/router/cacheRouter";
</script>

<template>

    <router-view v-slot="{ Component, route }">
      <transition appear name="fade-transform" mode="out-in">
        <keep-alive :include="cacheRouter">
          <div>
            <component :is="Component" :key="route.path"></component>
            <Login />
            <ThemeSwitch class="theme-switch"/>
          </div>
        </keep-alive>
      </transition>
    </router-view>

</template>

<style scoped>
.theme-switch{
  position: absolute;
  top: 20px;
  right: 20px;
  
}
</style>
